import { PaginationParamsType } from "@/library/common/types"

type _UseAllType = {
    Id: number
    ShopCode: string
    ShopName: string
    DineIn: number
    DineInAmount: string
    Takeaway: number
    TakeawayAmount: string
    OrderAmount: string
    UpdatedAt: string
    CreatedAt: string
    Ymd: string
    DataMonth: string
    Range: string
}

type _SelectParams<K extends keyof _UseAllType> = Partial<Pick<_UseAllType, K>> & PaginationParamsType

/**
 * 查询总报表
 */
export type SelectTotalParams = _SelectParams<"ShopCode" | "ShopName" | "Range">

/**
 * 查询日报表
 */
export type SelectDailyParams = SelectTotalParams & Partial<Pick<_UseAllType, "Ymd">>

/**
 * 查询月报表
*/
export type SelectMonthlyParams = SelectTotalParams & Partial<Pick<_UseAllType, "DataMonth">>

/**
 * 总报表响应
 */
export type SelectTotalDataType = Pick<_UseAllType, "Id" | "ShopCode" | "ShopName" | "DineIn" | "DineInAmount" | "Takeaway" | "TakeawayAmount" | "OrderAmount" | "UpdatedAt" | "CreatedAt">

/**
 * 日报表响应
 */
export type SelectDailyDataType = SelectTotalDataType & Pick<_UseAllType, "Ymd">

/**
 * 月报表响应
*/
export type SelectMonthlyDataType = SelectTotalDataType & Pick<_UseAllType, "DataMonth">